class Pet:
    pass

class Dog(Pet):
    pass

class Tigger:
    pass

def say(pet):
    # python中没有严格的多态
    # 判断pet是否是Pet或其子类
    if isinstance(pet,Pet):
        print('是宠物')
    else:
        print('不是宠物')



d=Dog()
t=Tigger()
say(d)
say(t)
